package ru.ifmo;

/**
 * Created by Admin on 13.02.15.
 */
public class KPInsertDataThread extends Thread {
    private final SmartSpaceKP kp;
    private SmartSpaceTriplet data;


    public KPInsertDataThread(SmartSpaceKP kp, SmartSpaceTriplet data) {
        this.kp = kp;
        this.data = data;
    }

    @Override
    public void run() {
        synchronized (kp) {
            try {
                kp.insertData(data);
            } catch (SmartSpaceException e) {
                e.printStackTrace();
            }
        }
    }
}
